import { getAdminRequest as request } from "@/utils/request";
// 管理端

//管理员登录
export const adminLoginApi = function(loginParam) {
  return request({
    method: "POST",
    url: "/login",
    data: loginParam
  });
};

//获取用户信息
export const getUserInfoApi = function() {
  return request({
    method: "GET",
    url: "/userinfo"
  });
};

//退出登陆
export const adminLogoutAPi = function() {
  return request({
    method: "POST",
    url: "/logout"
  });
};

//获取用户菜单列表
export const adminUserMenuListApi = function() {
  return request({
    method: "GET",
    url: "/menu/user"
  });
};

//根据分类获取权限列表
export const adminMenuListApi = function(menuTypeParam) {
  return request({
    method: "GET",
    url: "/menu/list",
    params: menuTypeParam
  });
};

//修改权限信息
export const adminEditMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/menu/edit",
    data
  });
};

//添加权限信息
export const adminAddMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/menu/add",
    data
  });
};

//删除权限
export const adminDelMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/menu/del",
    data
  });
};
//批量删除
export const adminDelsMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/menu/dels",
    data
  });
};

//获取角色列表
export const adminRoleListApi = function(params) {
  return request({
    method: "GET",
    url: "/role/page",
    params
  });
};

//获取所有角色列表
export const adminGetRoleListApi = function() {
  return request({
    method: "GET",
    url: "/role/list"
  });
};

//修改角色信息
export const adminEditRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/role/edit",
    data
  });
};

//添加角色信息
export const adminAddRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/role/add",
    data
  });
};

//删除角色
export const adminDelRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/role/del",
    data
  });
};
//批量删除
export const adminDelsRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/role/dels",
    data
  });
};

//获取角色权限关系列表//获取角色列表
export const adminRoleMenuListApi = function(params) {
  return request({
    method: "GET",
    url: "/roleMenu/list",
    params
  });
};

//修改角色权限关系
export const adminEditRoleMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/roleMenu/edit",
    data
  });
};

//添加角色权限关系
export const adminAddRoleMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/roleMenu/add",
    data
  });
};

//删除角色权限关系
export const adminDelRoleMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/roleMenu/del",
    data
  });
};
//批量删除
export const adminDelsRoleMenuApi = function(data) {
  return request({
    method: "POST",
    url: "/roleMenu/dels",
    data
  });
};

//获取该角色没有的权限列表
export const adminMenuAllApi = function(params) {
  return request({
    method: "GET",
    url: "/roleMenu/noList",
    params
  });
};

//分页获取服装列表
export const adminDeptPageApi = function(params) {
  return request({
    method: "GET",
    url: "/dept/page",
    params
  });
};

//修改服装信息
export const adminEditDeptApi = function(data) {
  return request({
    method: "POST",
    url: "/dept/edit",
    data
  });
};

//添加服装信息
export const adminAddDeptApi = function(data) {
  return request({
    method: "POST",
    url: "/dept/add",
    data
  });
};

//删除服装信息
export const adminDelDeptApi = function(data) {
  return request({
    method: "POST",
    url: "/dept/del",
    data
  });
};
//批量删除
export const adminDelsDeptApi = function(data) {
  return request({
    method: "POST",
    url: "/dept/dels",
    data
  });
};

//分页获取年级信息列表
export const adminGradePageApi = function(params) {
  return request({
    method: "GET",
    url: "/grade/page",
    params
  });
};

//修改年级信息
export const adminEditGradeApi = function(data) {
  return request({
    method: "POST",
    url: "/grade/edit",
    data
  });
};

//添加年级信息
export const adminAddGradeApi = function(data) {
  return request({
    method: "POST",
    url: "/grade/add",
    data
  });
};

//删除年级信息
export const adminDelGradeApi = function(data) {
  return request({
    method: "POST",
    url: "/grade/del",
    data
  });
};
//批量删除
export const adminDelsGradeApi = function(data) {
  return request({
    method: "POST",
    url: "/grade/dels",
    data
  });
};

//分页获取专业信息列表
export const adminMajorPageApi = function(params) {
  return request({
    method: "GET",
    url: "/major/page",
    params
  });
};

//修改专业信息
export const adminEditMajorApi = function(data) {
  return request({
    method: "POST",
    url: "/major/edit",
    data
  });
};

//添加专业信息
export const adminAddMajorApi = function(data) {
  return request({
    method: "POST",
    url: "/major/add",
    data
  });
};

//删除专业信息
export const adminDelMajorApi = function(data) {
  return request({
    method: "POST",
    url: "/major/del",
    data
  });
};
//批量删除
export const adminDelsMajorApi = function(data) {
  return request({
    method: "POST",
    url: "/major/dels",
    data
  });
};
//获取二级学院列表
export const adminGetDeptListApi = function() {
  return request({
    method: "GET",
    url: "/dept/list"
  });
};

//分页获取班级信息列表
export const adminClassPageApi = function(params) {
  return request({
    method: "GET",
    url: "/classes/page",
    params
  });
};

//修改班级信息
export const adminEditClassApi = function(data) {
  return request({
    method: "POST",
    url: "/classes/edit",
    data
  });
};

//添加班级信息
export const adminAddClassApi = function(data) {
  return request({
    method: "POST",
    url: "/classes/add",
    data
  });
};

//删除班级信息
export const adminDelClassApi = function(data) {
  return request({
    method: "POST",
    url: "/classes/del",
    data
  });
};
//批量删除
export const adminDelsClassApi = function(data) {
  return request({
    method: "POST",
    url: "/classes/dels",
    data
  });
};
//获取专业列表
export const adminGetMajorListApi = function() {
  return request({
    method: "GET",
    url: "/major/list"
  });
};

//获取年级列表
export const adminGetGradeListApi = function() {
  return request({
    method: "GET",
    url: "/grade/list"
  });
};

//分页获取用户信息列表
export const adminUserPageApi = function(params) {
  return request({
    method: "GET",
    url: "/user/page",
    params
  });
};

//修改用户信息
export const adminEditUserApi = function(data) {
  return request({
    method: "POST",
    url: "/user/edit",
    data
  });
};

//修改用户状态
export const adminEditUserStatusApi = function(data) {
  return request({
    method: "POST",
    url: "/user/editStatus",
    data
  });
};

//添加用户信息
export const adminAddUserApi = function(data) {
  return request({
    method: "POST",
    url: "/user/add",
    data
  });
};

//删除用户信息
export const adminDelUserApi = function(data) {
  return request({
    method: "POST",
    url: "/user/del",
    data
  });
};
//批量删除
export const adminDelsUserApi = function(data) {
  return request({
    method: "POST",
    url: "/user/dels",
    data
  });
};

//获取分队队员列表
export const adminGetUnitUserListApi = function() {
  return request({
    method: "GET",
    url: "/unit/userList"
  });
};

//分页获取分队信息列表
export const adminUnitPageApi = function(params) {
  return request({
    method: "GET",
    url: "/unit/page",
    params
  });
};

//获取全部分队列表
export const adminGetUnitListApi = function() {
  return request({
    method: "GET",
    url: "/unit/list"
  });
};

//修改分队信息
export const adminEditUnitApi = function(data) {
  return request({
    method: "POST",
    url: "/unit/edit",
    data
  });
};

//添加分队信息
export const adminAddUnitApi = function(data) {
  return request({
    method: "POST",
    url: "/unit/add",
    data
  });
};

//删除分队信息
export const adminDelUnitApi = function(data) {
  return request({
    method: "POST",
    url: "/unit/del",
    data
  });
};
//批量删除
export const adminDelsUnitApi = function(data) {
  return request({
    method: "POST",
    url: "/unit/dels",
    data
  });
};

//获取班级列表
export const adminGetClassListApi = function() {
  return request({
    method: "GET",
    url: "/classes/list"
  });
};

//通过ID 获取用户详细信息
export const adminGetUserByIdApi = function(data) {
  return request({
    method: "GET",
    url: "/user/" + data
  });
};

//获取角色权限关系列表//获取角色列表
export const adminUserRolePageApi = function(params) {
  return request({
    method: "GET",
    url: "/userRole/page",
    params
  });
};

//修改角色权限关系
export const adminEditUserRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/userRole/edit",
    data
  });
};

//添加角色权限关系
export const adminAddUserRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/userRole/add",
    data
  });
};

//删除角色权限关系
export const adminDelUserRoleApi = function(data) {
  return request({
    method: "POST",
    url: "/userRole/del",
    data
  });
};

//分页获取服装列表
export const adminClothingPageApi = function(params) {
  return request({
    method: "GET",
    url: "/clothing/page",
    params
  });
};

//修改服装信息
export const adminEditClothingApi = function(data) {
  return request({
    method: "POST",
    url: "/clothing/edit",
    data
  });
};

//添加服装信息
export const adminAddClothingApi = function(data) {
  return request({
    method: "POST",
    url: "/clothing/add",
    data
  });
};

//删除服装信息
export const adminDelClothingApi = function(data) {
  return request({
    method: "POST",
    url: "/clothing/del",
    data
  });
};
//批量删除
export const adminDelsClothingApi = function(data) {
  return request({
    method: "POST",
    url: "/clothing/dels",
    data
  });
};

//分页获取装备列表
export const adminEquipmentPageApi = function(params) {
  return request({
    method: "GET",
    url: "/equipment/page",
    params
  });
};

//修改装备信息
export const adminEditEquipmentApi = function(data) {
  return request({
    method: "POST",
    url: "/equipment/edit",
    data
  });
};

//添加装备信息
export const adminAddEquipmentApi = function(data) {
  return request({
    method: "POST",
    url: "/equipment/add",
    data
  });
};

//删除装备信息
export const adminDelEquipmentApi = function(data) {
  return request({
    method: "POST",
    url: "/equipment/del",
    data
  });
};
//批量删除
export const adminDelsEquipmentApi = function(data) {
  return request({
    method: "POST",
    url: "/equipment/dels",
    data
  });
};

//转正
export const adminEditUserRegularApi = function(data) {
  return request({
    method: "POST",
    url: "/user/regular",
    data
  });
};

//退队
export const adminEditUserLeaveApi = function(data) {
  return request({
    method: "POST",
    url: "/user/leave",
    data
  });
};

//退役
export const adminEditUserRetireApi = function(data) {
  return request({
    method: "POST",
    url: "/user/retire",
    data
  });
};


//获取队员数量
export const adminGetUserCountAPi = function(params) {
  return request({
    method: "GET",
    url: "/user/count",
    params
  });
}